package com.dc.project.basics.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.dc.common.validated.DeleteGroup;
import com.dc.common.validated.InsertGroup;
import com.dc.common.validated.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 产品表(BasProduct)实体类
 *
 * @author zhuangcy
 * @since 2021-06-12 15:31:20
 */
@TableName("bas_product")
@Data
@ApiModel(value = "产品表")
public class BasProduct implements Serializable {
    private static final long serialVersionUID = -93888867074946243L;
    /**
     * 产品id
     */
    @NotNull(message = "产品id不能为空", groups = {UpdateGroup.class, DeleteGroup.class})
    @TableId(value = "product_id", type = IdType.AUTO)
    @ApiModelProperty(name = "productId", value = "产品id")
    private Integer productId;
    /**
     * 产品编码
     */
    @NotNull(message = "产品编码不能为空", groups = {UpdateGroup.class, InsertGroup.class})
    @TableField(value = "product_code")
    @ApiModelProperty(name = "productCode", value = "产品编码")
    private String productCode;
    /**
     * 产品名称
     */
    @NotNull(message = "产品名称不能为空", groups = {UpdateGroup.class, InsertGroup.class})
    @TableField(value = "product_name")
    @ApiModelProperty(name = "productName", value = "产品名称")
    private String productName;
    /**
     * 规格
     */
    @TableField(value = "spec")
    @ApiModelProperty(name = "spec", value = "规格")
    private String spec;
    /**
     * 型号
     */
    @TableField(value = "model")
    @ApiModelProperty(name = "model", value = "型号")
    private String model;
    /**
     * 单价
     */
    @TableField(value = "price")
    @ApiModelProperty(name = "price", value = "单价")
    private BigDecimal price;
    /**
     * 类别id
     */
    @TableField(value = "category_id")
    @ApiModelProperty(name = "categoryId", value = "类别id")
    private Integer categoryId;
    /**
     * 类别
     */
    @TableField(value = "category_name")
    @ApiModelProperty(name = "categoryName", value = "类别")
    private String categoryName;
    /**
     * 单位id
     */
    @TableField(value = "unit_id")
    @ApiModelProperty(name = "unitId", value = "单位id")
    private Integer unitId;
    /**
     * 单位
     */
    @TableField(value = "unit_name")
    @ApiModelProperty(name = "unitName", value = "单位")
    private String unitName;
    /**
     * 备注
     */
    @TableField(value = "remark")
    @ApiModelProperty(name = "remark", value = "备注")
    private String remark;
    /**
     * 状态（0正常 1停用）
     */
    @TableField(value = "status")
    @ApiModelProperty(name = "status", value = "状态（0正常 1停用）")
    private String status;
    /**
     * 删除标志（0代表存在 1代表删除）
     */
    @TableField(value = "del_flag")
    @ApiModelProperty(name = "delFlag", value = "删除标志（0代表存在 1代表删除）")
    private String delFlag;
    /**
     * 创建者id
     */
    @TableField(value = "created_id", fill = FieldFill.INSERT)
    @ApiModelProperty(name = "createdId", value = "创建者id")
    private Integer createdId;
    /**
     * 创建者
     */
    @TableField(value = "created_by", fill = FieldFill.INSERT)
    @ApiModelProperty(name = "createdBy", value = "创建者")
    private String createdBy;
    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @ApiModelProperty(name = "createdTime", value = "创建时间")
    private Date createdTime;
    /**
     * 更新者id
     */
    @TableField(value = "updated_id", fill = FieldFill.UPDATE)
    @ApiModelProperty(name = "updatedId", value = "更新者id")
    private Integer updatedId;
    /**
     * 更新者
     */
    @TableField(value = "updated_by", fill = FieldFill.UPDATE)
    @ApiModelProperty(name = "updatedBy", value = "更新者")
    private String updatedBy;
    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
    @ApiModelProperty(name = "updatedTime", value = "更新时间")
    private Date updatedTime;


}